import Vue from 'vue'
import Router from 'vue-router'

import Login from '@/pages/login'
import layout from '@/pages/layout'
import form from '@/pages/form/index'
import table from '@/pages/table/index'
// import CompTable from '@/components/CompTable'

// Vue.use(CompTable)
Vue.use(Router)

const routes = [
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/layout',
    redirect: '/table',
    component: layout,
    children: [
      {
        path: '/form',
        component: form
      },
      {
        path: '/table',
        component: table
      }
    ]
  }
]

const route = new Router({
  routes
})

export default route
